const Router = require("koa-router");
const { BASE_URL } = require("../constants/public");
const {
  create,
  addComment,
  list,
  commentList,
  like,
  commentLke,
  popular,
  search
} = require("../controller/ypy.ask.controller");
const ypyAskRouter = new Router({ prefix: `${BASE_URL}/ypy/ask` });

ypyAskRouter.post("/create", create);
ypyAskRouter.post("/comment/add", addComment);
ypyAskRouter.get("/list", list);
ypyAskRouter.get("/comment/list", commentList);
ypyAskRouter.get("/like", like);
ypyAskRouter.get("/comment/like", commentLke);
ypyAskRouter.get("/popular", popular);
ypyAskRouter.post("/search", search);

module.exports = ypyAskRouter;
